//
//  VCOfSecond.m
//  UI07_UINavigationController
//
//  Created by Scott on 16/5/11.
//  Copyright © 2016年 Scott. All rights reserved.
//

#import "VCOfSecond.h"
#import "VCOfThird.h"

@interface VCOfSecond ()

@end

@implementation VCOfSecond

- (void)viewDidLoad {
    [super viewDidLoad];
  
    self.view.backgroundColor = [UIColor whiteColor];
    
    [self configNavigationItem];
    
}

- (void)configNavigationItem {
    
    self.navigationItem.titleView = [[UISegmentedControl alloc] initWithItems:@[@"消息", @"通话"]];
    
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"下一页" style:UIBarButtonItemStylePlain target:self action:@selector(handleRight)];
}

- (void)handleRight {

    VCOfThird *third = [[VCOfThird alloc] init];
    
    [self.navigationController pushViewController:third animated:YES];
    
    [third release];
    
}





@end
